package com.framework.loippi.entity;

import com.framework.loippi.mybatis.eitity.GenericEntity;
import com.framework.loippi.mybatis.ext.annotation.Column;
import com.framework.loippi.mybatis.ext.annotation.Table;

import org.springframework.format.annotation.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * Entity - 订单药品项
 * 
 * @author wmj
 * @version 2.0
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "T_ORDER_ITEM")
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties({ "handler","hibernateLazyInitializer" }) 
@ApiModel(value="订单药品项",description="订单药品项")
public class OrderItem implements GenericEntity {

	private static final long serialVersionUID = 5081846432919091193L;

	/** id */
	@Column(id = true, name = "id", updatable = false)
	@ApiModelProperty(value = "id")
	private Long id;
	
	/** 订单id */
	@Column(name = "order_id" )
	@ApiModelProperty(value = "订单id")
	private Long orderId;
	
	/** 药品id */
	@Column(name = "medicine_id" )
	@ApiModelProperty(value = "药品id")
	private Long medicineId;
	
	/** 药品名称 */
	@Column(name = "medicine_name" )
	@ApiModelProperty(value = "药品名称")
	private String medicineName;
	
	/** 单价 */
	@Column(name = "price" )
	@ApiModelProperty(value = "单价")
	private java.math.BigDecimal price;
	
	/** 数量 */
	@Column(name = "medicine_count" )
	@ApiModelProperty(value = "数量")
	private Integer medicineCount;
	
	/** 总额 */
	@Column(name = "amount" )
	@ApiModelProperty(value = "总额")
	private java.math.BigDecimal amount;
	
	/** 创建时间 */
	@Column(name = "create_time" )
	@ApiModelProperty(value = "创建时间")
	private java.util.Date createTime;
	
	/** 药品规格 */
	@Column(name = "specification_value" )
	@ApiModelProperty(value = "药品规格")
	private String specificationValue;
	
	/** 详情id(与父订单的类型匹配) */
	@Column(name = "details_id" )
	@ApiModelProperty(value = "详情id(与父订单的类型匹配)")
	private Long detailsId;
	
	/** 药品详情图片 */
	@Column(name = "thumbnail_pic" )
	@ApiModelProperty(value = "药品详情图片")
	private String thumbnailPic;
	
	/** 售后状态(1-待售后 2售后中 3-售后完成,4-售后失败) */
	@Column(name = "status" )
	@ApiModelProperty(value = "售后状态(1-待售后 2售后中 3-售后完成,4-售后失败)")
	private Integer status;
	
}
